<div style="margin:30px 0 30px 0">If you want recover your password, enter your username or your e-mail adresse below :</div>

<?php

if (isset($error) && in_array('username', $error)) {
	?><div class="alert">Your username is not valid (3 characters minimum).</div><?
} elseif (isset($error) && in_array('check_username', $error)) {
	?><div class="alert">Your username is not available.</div><?
}elseif (isset($error) && in_array('many', $error)) {
	?><div class="alert">This email is used by more than one account. Please specify your username.</div><?
}elseif (isset($error) && in_array('mail', $error)) {
	?><div class="alert">This email is not valid.</div><?
}elseif (isset($error) && in_array('vide', $error)) {
	?><div class="alert">You must fill in one field.</div><?
}


if (count($mess) == 0){
?>
<form method="post" action="password.php">
<input type="hidden" name="oipw_action" value="password">

<table>
	<tr>
		<td><b>Recover by Username :</b></td>
		<td></td>
	</tr>
	<tr>
		<td height="5"></td>
	</tr>
	<tr>
		<td align="right"><b class="selected"><?=OPENIDOO_DOMAIN?> / </b></td>
		<td><input type="text" name="oipw_username" value="<?php if (isset($_POST['oipw_username']) && ($_POST['oipw_username'])) echo htmlentities($_POST['oipw_username'], ENT_QUOTES, 'UTF-8') ?>" /></td>
	</tr>
	<tr>
		<td height="25"></td>
	</tr>
	<tr>
	<td colspan="2" align="left" valign="middle"><b>OR</b></tr>
	<tr>
		<td height="25"></td>
	</tr>
	<tr>
		<td><b>Recover by E-mail :</b></td>
		<td></td>
	</tr>
	<tr>
		<td height="5"></td>
	</tr>
	<tr>
		<td></td>
		<td><input type="text" name="oipw_email" value="<?php if (isset($_POST['oipw_email']) && ($_POST['oipw_email'])) echo htmlentities($_POST['oipw_email'], ENT_QUOTES, 'UTF-8') ?>" /></td>
	</tr>
	<tr>
		<td height="5"></td>
	</tr>
	<tr>
		<td><input type="submit" name="oipw_submit" value="Recover Account" /></td>
		<td></td>
	</tr>
</table>

</form>
<?}else{
echo $mess[0];
}
?>